package cn.zf233.xcloud.vo;

import java.io.Serializable;

/**
 * Created by zf233 on 2021/8/12
 */
public class IpInfo implements Serializable {

    private static final long serialVersionUID = -6929918960973991563L;
    private String status;
    private String info;
    private String infocode;
    private String country;
    private String province;
    private String city;
    private String district;
    private String isp;

    public boolean success() {
        return "1".equals(status) && "10000".equals(infocode);
    }

    public IpInfo() {
    }

    public IpInfo(String status, String info, String infocode, String country, String province, String city, String district, String isp) {
        this.status = status;
        this.info = info;
        this.infocode = infocode;
        this.country = country;
        this.province = province;
        this.city = city;
        this.district = district;
        this.isp = isp;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public String getInfocode() {
        return infocode;
    }

    public void setInfocode(String infocode) {
        this.infocode = infocode;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getDistrict() {
        return district;
    }

    public void setDistrict(String district) {
        this.district = district;
    }

    public String getIsp() {
        return isp;
    }

    public void setIsp(String isp) {
        this.isp = isp;
    }

    @Override
    public String toString() {
        return "IpAddress{" +
                "status='" + status + '\'' +
                ", info='" + info + '\'' +
                ", infocode='" + infocode + '\'' +
                ", country='" + country + '\'' +
                ", province='" + province + '\'' +
                ", city='" + city + '\'' +
                ", district='" + district + '\'' +
                ", isp='" + isp + '\'' +
                '}';
    }
}
